package
{
	import flash.events.ProgressEvent;
	import flash.net.URLLoader;
	import flash.net.URLLoaderDataFormat;
	import flash.net.URLRequest;
	
	import root.TestRoot;
	
	public class LoadProgress extends TestRoot
	{
		public function LoadProgress()
		{
			super();
			
			var loader:URLLoader = new URLLoader();
			var req:URLRequest = new URLRequest("http://localhost/test.html");
			loader.dataFormat = URLLoaderDataFormat.TEXT;
			loader.addEventListener(ProgressEvent.PROGRESS, onProgress);
			loader.load(req);
		}
		
		public	function	onProgress(evt:ProgressEvent):void{
			var loader:URLLoader = evt.target as URLLoader;
			trace("loaded:"+evt.bytesLoaded+",total:"+evt.bytesTotal
				+",per:"+evt.bytesLoaded/evt.bytesTotal);
		}
	}
}